import Vue from 'vue'
import App from './App.vue'
import ElementUI from 'element-ui'
import '../node_modules/element-ui/lib/theme-chalk/index.css'
import router from "./router";
import axios from "axios";
import qs from 'qs'
import './assets/css/global.css'
import TreeTable from 'vue-table-with-tree-grid'

Vue.prototype.qs=qs

axios.defaults.baseURL='/api'
Vue.prototype.$http=axios
axios.interceptors.request.use(config=>{
  console.log(config);
  config.headers.Authorization = window.sessionStorage.getItem("token");
  return config;
})
Vue.use(ElementUI)
Vue.config.productionTip = false
Vue.component("tree-table", TreeTable);

new Vue({
  axios,
  router,
  render: h => h(App),
}).$mount('#app')
